import React from 'react';
import { Divider } from 'antd';
import { Toolbar } from 'gg-editor';
import ToolbarButton from './ToolbarButton';
import IconFont from '../../common/IconFont';
import styles from './index.less';



class FlowToolbar extends React.Component {

  openGlobalSetting=()=>{
    this.props.openPage('golbalSet')
  };

  render() {
    return (
      <Toolbar className={styles.toolbar}>
        <ToolbarButton command="undo" zch="撤销"/>
        <ToolbarButton command="redo" zch="返回"/>
        <Divider type="vertical"/>
        <ToolbarButton command="multiSelect" icon="fullscreen" zch="多选"/>
        <ToolbarButton command="delete" zch="删除"/>
        <ToolbarButton command="paste" icon="daoru" zch="导入"/>
        <Divider type="vertical"/>
        <ToolbarButton command="zoomIn" icon="fangda" zch="放大"/>
        <ToolbarButton command="zoomOut" icon="suoxiao" zch="缩小"/>
        <ToolbarButton command="resetZoom" icon="juzhong" zch="自适应屏幕"/>
        <ToolbarButton command="autoZoom" icon="gongzuoliuchengtu" zch="居中"/>
        <ToolbarButton command="fullscreen" icon="quanping1" zch="全屏"/>
        <span className={styles.baogao}><IconFont type="icon-baogao" style={{ marginRight: 5 }}/>训练准确率报告</span>
        <span className={styles.setting} onClick={() => this.openGlobalSetting()}><IconFont type="icon-setting" style={{ marginRight: 5 }}/>全局设置</span>
      </Toolbar>
    );
  };
}

export default FlowToolbar;
